package com.snailhd.handler;

import com.snailhd.common.util.web.SpringContextUtil;
import com.snailhd.entity.MqttMsg;

/**
 * @author hd
 * @description
 * @date 2019-11-17 17:23
 */
public class MqttMsgExecutor {

    public static void exec(MqttMsg mqttMsg){
        MqttMsgHandler handler = SpringContextUtil.getBean(mqttMsg.getTags(),MqttMsgHandler.class);
        if(null!=handler){
            handler.handle(mqttMsg);
        }
    }
}
